﻿

Public Class DLDictionary
    Inherits DLBase

#Region "Declaration"

    Private m_sForeignKey As String
    Private m_sStoreGetByforeignKey As String = "Proc_DI_Select_"
    Private m_sStoreDeleteByforeignKey As String = "Proc_DI_Delete_"

#End Region

#Region "Property"

    Public Property ForeignKey() As String
        Get
            Return m_sForeignKey
        End Get
        Set(ByVal value As String)
            m_sForeignKey = value
            m_sStoreGetByforeignKey += TableName + "sBy" + m_sForeignKey
            m_sStoreDeleteByforeignKey += TableName + "sBy" + m_sForeignKey
        End Set
    End Property

#End Region

#Region "Constructor"

    Public Sub New(ByVal databaseConnectionName As String)
        MyBase.New(databaseConnectionName)
        strSubSystemCode = "DI"
    End Sub

#End Region

#Region "Method"

#Region "Private Method"

#End Region

#Region "Public Method"

    Public Sub GetUnitConvertByItemID(ByRef table As DataTable, ByVal sItemID As String)
        db.LoadDataSet("Proc_DI_GetUnitCovertByItemID", table.DataSet, New String() {table.TableName}, sItemID)
    End Sub

    Public Function GetUnitConvertByItemID(ByVal sItemID As String) As DataTable
        Dim ds As New DataSet
        db.LoadDataSet("Proc_DI_GetUnitCovertByItemID", ds, New String() {"UnitConvert"}, sItemID)

        If ds.Tables.Count > 0 Then
            Return ds.Tables(0)
        Else
            Return Nothing
        End If
    End Function

#End Region

#Region "Overridable"

#End Region

#End Region

#Region "Event"

#Region "Form event"

#End Region

#Region "Control event"

#End Region

#Region "User event"

#End Region

#End Region
End Class
